//
//  WebViewController.m
//  CarHome
//
//  Created by dlios on 15-3-24.
//  Copyright (c) 2015年 apple. All rights reserved.
//

#import "WebViewController.h"

@interface WebViewController ()

@end

@implementation WebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    self.view.backgroundColor = [UIColor whiteColor];
    
    
    UIWebView *web = [[UIWebView alloc] initWithFrame:CGRectMake( 0, 0, 375, 567)];
    [self.view addSubview:web];
    [web release];
    
    NSString *str = [NSString stringWithFormat:@"http://forum.app.autohome.com.cn/autov4.6/forum/club/topiccontent-a2-pm2-v4.6.0-t%@-o0-p1-s20-c1-nt0-fs0-sp0-al0-cw360.json", self.wriid];
    NSLog(@"000000000000%@", self.wriid);
    NSURL *url = [NSURL URLWithString:str];
    NSURLRequest *request = [[NSURLRequest alloc] initWithURL:url];
    [web loadRequest:request];
    [web setUserInteractionEnabled:YES];


    
    self.navigationItem.rightBarButtonItems = @[[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"iconfont-fenxiang.png"] style:UIBarButtonItemStylePlain target:self action:@selector(share:)], [[UIBarButtonItem alloc]initWithImage:[UIImage imageNamed:@"iconfont-shoucang.png"] style:UIBarButtonItemStylePlain target:self action:@selector(collect:)]];

    
    
}
- (void)collect:(UIBarButtonItem *)item
{
    
}
- (void)share:(UIBarButtonItem *)item
{
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
